import store from "../store";

// device类型
let device = window.device || localStorage.getItem("device");

switch (device) {
  case "desktop":
    break;
  case "pad":
  case "mobile":
    store.dispatch("app/closeSideBar", { withoutAnimation: true });
    break;
  default:
    device = "desktop";
    break;
}

// 记录store
store.dispatch("app/toggleDevice", device);
